package com.cyz.springdemo.util;

/**
 * @program: dinner
 * @description: 对时间进行加密的工具类
 * @author: wangjie
 * @create: 2019-07-10 17:50
 **/
public class EncryptionUtil {

    public static String dateEncry(String dateStr){

        //定义转换的数组
        char[] changeArr = {'0','o','t','h','f','i','s','v','e','n'};

        char[] dateArr = dateStr.toCharArray();
        //遍历数组
        String dateStrNew = "";
        for (char a : dateArr){
            int b = Integer.valueOf(String.valueOf(a));
            String c = String.valueOf(changeArr[b]);
            dateStrNew+=c;
        }
        return dateStrNew;
    }
}
